package com.cwx.mychat.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cwx.mychat.controller.UserContactCategoryController;
import com.cwx.mychat.entity.po.UserContactCategory;
import com.cwx.mychat.exception.BusinessException;
import com.cwx.mychat.service.impl.UserContactCategoryServiceImpl;
import com.cwx.mychat.utils.R;

/**
 * 作者： cwx
 * 时间： 2024/12/11 17:22
 * 版本： 1.0
 * 注释：
 */
public interface UserContactCategoryService extends IService<UserContactCategory> {

    /**
     * 查询所有用户分组
     * @param userId
     * @return
     */
    R getAllGroup(String userId);

    /**
     * 查询所有群组分组
     * @param userId
     * @return
     */
    R getAllGroupCategory(String userId);

    /**
     * 新建分组
     */
    int createGroup(String userId, UserContactCategory userContactCategory);

    /**
     * 添加分组
     * @param groupId
     * @param userId
     * @param receiveId
     */
    void addGroup(String groupId, String userId, String receiveId) throws BusinessException;

    /**
     * 添加群分组
     * @param contactCategoryParam
     * @return
     */
    R addGroupCategory(UserContactCategoryServiceImpl.ContactCategoryParam contactCategoryParam) throws BusinessException;

    /**
     * 更新分组
     * @param contactCategoryParam
     * @return
     */
    R updateCategory(UserContactCategoryController.ContactCategoryParam contactCategoryParam) throws BusinessException;
}

